<!DOCTYPE html>
<html lang="zh">

	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" type="text/css" href="../img-font/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="../css/css.css" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<script src="../js/jquery.min.js"></script>
		<script src="../js/main.js"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<script src="../js/Url.js"></script>
		<title></title>
		<style type="text/css">
			.record-external {
				width: 100%;
				height: 100%;
				background: #ebebeb;
			}
			
			.record {
				width: 100%;
				height: 40px;
				text-align: center;
				background: #666;
				line-height: 40px;
				color: #fff;
			}
			
			nav {
				width: 100%;
				height: 100%;
				background: #fff;
				overflow-y: scroll;
				font-size: 14px;
				margin-top: 50px;
			}
			
			nav ul {
				display: block;
				width: 100%;
				display: flex;
				margin-top: 20px;
			}
			
			nav ul li {
				display: block;
				width: 25%;
				text-align: center;
				line-height: 30px;
			}
			
			.fanjian {
				height: 100%;
				display: block;
				color: #000;
				font-size: 24px;
				line-height: 30px;
				float: left;
				text-indent: 24px;
				position: absolute;
				top: 10px;
				left: 0;
			}
		</style>
	</head>

	<body>
		<!--纪录列表-->
		<div class="record-external">
			<div class="topnav">
				<a href="javascript:history.go(-1)"><span class="fanjian iconfont icon-xia"></span></a>支出纪录
			</div>
			<nav>
				<ul>
					<li>序号</li>
					<li>支出时间</li>
					<li>支出佣金</li>
					<li>操作</li>
				</ul>
			</nav>
		</div>
	</body>

</html>
<script type="text/javascript">
	//时间转换
	function getLocalTime(nS) {
		return new Date(parseInt(nS)).toLocaleString().substr(0, 17)

	}
	//	expendTime
	$(function() {
		$.ajax({
			type: "get",
			url: BaseUrl + "/foot/user/getExpendRecord",
			contentType: "application/json; charset=utf-8",
			success: function(res) {
				for(var i = 0; i < res.data.value.length; i++) {
					var acc = '';
					acc += getLocalTime(res.data.value[i].expendTime);
					var str = '';
					str += '<ul>';
					str += '<li>' + (i + 1) + '</li>';
					str += '<li>' + acc.substring(9, length) + '</li>';
					str += '<li>' + res.data.value[i].expendMoney + '</li>';
					str += '<li>--</li>';
					str += '</ul>';
					$('nav').append(str)
				}
			}
		});
	})
</script>
